/**
 * @method request
 * @param {String} type 
 * @param {String} url 
 */

export const request=(type,url)=>{
    const request =new XMLHttpRequest;
    request.onreadystatechange=function(){
        if(request.readyState==4 && request.status==200){
            console.log("请求成功")
        }
    }
    request.open(type,url);
    request.setRequestHeader("content-type","application/json");
    request.send();
}